package com.xg.te.core;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import com.xg.te.core.bean.WebsiteBean;

/**
 * 代理商缓存
 * 
 * @author liuguojun
 * @date 2014-06-26
 */
public class WebsiteStore {

	private static Map<String, WebsiteBean> store = new HashMap<String, WebsiteBean>();

	public static void put(WebsiteBean agent) throws Exception {
		store.put(agent.getConstantValue("name"), agent);
		store.put(agent.getConstantValue("code"), agent);
	}

	public static WebsiteBean get(String name) {
		return store.get(name);
	}

	public static boolean isEmpty() {
		return store.isEmpty();
	}

	public static Set<String> keys() {
		return store.keySet();
	}

	public static Collection<WebsiteBean> values() {
		return store.values();
	}
}
